<template>
    <div class="hello">
        <h1>点击数量 {{$store.state.num}}</h1>
        <button @click="addNum()">ADD</button>

    </div>
</template>

<script>
    export default {
        name: 'HelloWorld',
        props: {
            msg: String
        }, methods: {
            addNum() {
                this.$store.commit("addNum")
            }
        }
    }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">


</style>
